package com.scsystem.xysc.service;

import com.scsystem.xysc.pojo.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.scsystem.xysc.pojo.vo.ReturnResult;

/**
* @author sky
* @description 针对表【product】的数据库操作Service
* @createDate 2023-10-15 22:55:23
*/
public interface ProductService extends IService<Product> {

    /**
     * 购买商品
     * @param pid 商品id
     * @param quantity 购买数量
     * @return 购买结果
     */
    ReturnResult<Boolean> purchase(Long pid, Integer quantity, Long uid);
}
